<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        {% block title %} 我的AI - 简单打造 {% endblock %}
    </title>

    <link rel="stylesheet" href="/static/UI/layui/css/layui.css">
    {% block css %}
    {% endblock %}
</head>

<body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo layui-hide-xs layui-bg-black">我的AI</div>
        </div>
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
                    <li class="layui-nav-item {% if request.path == '/web/pc/index/' %}layui-this{% endif %}"><a
                            href="/web/pc/index/">AI问答</a></li>
                    <li class="layui-nav-item {% if '/web/pc/generate_images/' in request.path %}layui-this{% endif %}">
                        <a href="/web/pc/generate_images/">图像生成</a></li>
                </ul>
            </div>
        </div>
        <div class="layui-body">
            {% csrf_token %}
            {% block content %}
            {% endblock %}
        </div>

    </div>

</body>
<script src="/static/tools/axios.min.js"></script>
<script src="/static/UI/layui/layui.js"></script>
<script>
    // 获取 csrfmiddlewaretoken
    function get_csrfmiddlewaretoken() {
        let csrfmiddlewaretoken = document.querySelector('input[name="csrfmiddlewaretoken"]').value;
        return csrfmiddlewaretoken;
    }
</script>
{% block js %}
{% endblock %}

</html>